package com.java.example.network.api

import com.java.example.network.response.BaseResponse
import com.java.example.network.response.LoginResponse
import io.reactivex.rxjava3.core.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.Headers
import retrofit2.http.POST
import retrofit2.http.Query

interface HttpAPI {
    @Headers("content-type: application/x-www-form-urlencoded")
    @POST("/api/account/login")
    @FormUrlEncoded
    fun login(@Field("phone") username: String, @Field("password") password: String, @Field("mac") mac: String): Observable<BaseResponse<LoginResponse>>

}